In recent years, the number of users on the internet has increased exponentially. With this increase in popularity, there has also come an increased demand for tools which enhance the xe2x80x9con line experience.xe2x80x9d To this end, new object oriented computer programming languages such as Java(trademark) have been developed. While these languages are an advance over prior technology, there is still room for improvement, particularly in the ability to efficiently modify layout of complex structures of graphical objects in variable sized windows. It is difficult to implement high quality, real time graphics on a web site using these languages.
Java allows minimum and maximum sizes to be specified for graphical objects and uses those values in a way that causes objects to act more stretchy when the differences between their minimum and maximum sizes is large.
A language explicitly developed for internet applications is the MIT Curl Language by M. Hostetter et al, xe2x80x9cCurl: A Gentle Slope Language for the Web,xe2x80x9d WorldWideWeb Journal, Vol II. Issue 2, O""Reilly and Associates, Spring 1997. The present invention extends the Curl language. (The language of the present invention will be referenced as xe2x80x9cCurlxe2x80x9d and is to be distinguished from the prior xe2x80x9cMIT Curlxe2x80x9d language.) MIT Curl used a three-pass layout negotiation scheme and allowed objects to describe their size preferences in terms of a minimum size and a stretchiness coefficient.
TeX is a widely used text formatting program developed by Donald Knuth. Donald E. Knuth, The TeXBook, Addison-Wesley, Reading, Mass., 1984. TeX uses a concept known as xe2x80x9cgluexe2x80x9d to express dimensional preferences of fill objects and incorporates different stretch and compression orders that can be used to describe the stretchiness and compressibility of different kinds of fill objects. As the overall dimensions of a layout change, the dimensions of individual fill objects change dependent on preferred sizes and stretchiness of those objects.
A graphics tool kit developed by Robert Halstead called Stk incorporates the concept of an elastic, known as xe2x80x9cglue,xe2x80x9d having a minimum size, a stretchiness coefficient and a stretch order associated with graphical objects having content. The tool kit formalizes the layout computations of horizontal and vertical boxes of graphical objects in terms of elastic add, max and divide operations. Stk is not widely known or used. The layout mechanism of Stk was incorporated into Swat, a graphics toolkit developed at MIT by Harold Abelson, James Miller and Natalya Cohen.
In accordance with the present invention, a system, method and data structure are provided for laying out graphical objects. Minimum and preferred sizes are defined for each of plural graphical objects. Elasticity is also defined for each of the plural graphical objects. The minimum sizes are specified independently of the preferred sizes and elasticities of the graphical objects. The graphical objects are processed to define a minimum size and a preferred size of a larger graphical object incorporating the plural graphical objects.
The preferred data structure of a graphical object includes a minimum size, a preferred size and elasticity. Elasticity of each graphical object may be defined by separate stretchiness and compressibility coefficients.
The processing may include an add operation in which each of the minimum size and preferred size of an add result is the sum of the minimum sizes and preferred sizes, respectively, of plural graphical objects.
The processing may include a max operation in which a max result includes a minimum size which is the greater of the minimum sizes of plural graphical objects. The max result also includes a preferred size which is the preferred size of the graphical object whose elasticity toward the other size is the least.
The processing may include a divide operation in which a size is divided among plural graphical objects. The divide operation divides the size in proportion to minimum sizes of the graphical objects if the size to be divided is less than the sum of the minimum sizes. If the size to be divided is greater than the sum of the minimum sizes, an excess or deficit relative to a sum of preferred sizes is computed. The size is divided according to elasticity of each graphical object with respect to required change from its preferred size. Elasticity of the result may be based on compress and stretch orders and, where orders are equal, on separate stretchiness and compressibility coefficients.